<script setup lang="ts">
import { inject } from 'vue'

  // 通过 inject 接收并使用 Provide 注入的值
  
  const count = inject('count');
const updateCount = inject<(num: number) => void>('updateCount');
</script>

<template>
  <div class="child-page" style="padding: 50px; border: 10px solid #ccc">
     child 组件 {{ count }} <button @click="updateCount!(100)">修改count</button>
  </div>
</template>